package priv.demo3.util;

import javax.sound.midi.Soundbank;

/**
 * Created on 2017/9/22.
 */
public class TimeUtil {
    private static Long s;
    public static void start(){
        s = System.currentTimeMillis();
    }
    public static void end(){
        if (s == null) {
            System.out.println("please call start() first!");
            return;
        }
        long e = System.currentTimeMillis();
        long t = e - s;
        s = null;
        System.out.println("time used: " + t + " ms, aka " + (t / 1000) + " ss");
    }
}
